<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<div class="navbar navbar-default navbar-static-top">
	<div class="container">
		<div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<c:url value="/"/>"><span>L</span>og 10 Transportes</a>
		</div>

		<div id="navbar" class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
				<li id="li_home"><a href="<c:url value="/"/>">Home</a></li>
				<li><a href="javascript:void(0);" onclick="ajaxURL('/quemSomos')">Quem Somos</a></li>
				<li><a href="javascript:void(0);" onclick="ajaxURL('/parceiros')">Parceiros</a></li>
				<li><a href="javascript:void(0);" onclick="ajaxURL('/contato')">Contato</a></li>
				<sec:authorize access="isAnonymous()">
					<li><a href="javascript:void(0);" onclick="ajaxURL('/entrar')">Login</a></li>	
					<li><a href="javascript:void(0);" onclick="ajaxURL('/registro')">Criar Conta</a></li>
				</sec:authorize>
				<sec:authorize access="isAuthenticated()">
					<li class="dropdown"> 
						<a class="dropdown-toggle" data-toggle="dropdown" href="#"> 
							<span class="glyphicon glyphicon-inbox"></span>&nbsp;&nbsp;Minha Conta<span class="caret"></span> 
						</a>
						<ul class="dropdown-menu" role="menu">
							<li> 
								<a href="/smmb">
									<span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;Meus Pedidos
								</a> 
							</li>
							<li> 
								<a href="javascript:void(0);">
									<span class="glyphicon glyphicon-ban-circle"></span>&nbsp;&nbsp;Meus Dados Cadastrais
								</a>
							</li>
							<li>
								<a href="javascript:void(0);"> 
									<span class="glyphicon glyphicon-arrow-left"></span>&nbsp;&nbsp;Outros serviços
								</a>
							</li>
						</ul>
					</li>
					<li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">
						<span class="glyphicon glyphicon-user nav-icon-notification"></span>&nbsp;<sec:authentication property="principal"/> <span class="caret"></span> </a>
						<ul class="dropdown-menu" role="menu">
							<li> <a href="<c:url value="/j_spring_security_logout"/>"> <span class="glyphicon glyphicon-log-out"></span> Logout</a> </li>
						</ul>
					</li>
				</sec:authorize>
			</ul>
		</div>
	</div>
</div>
<script>
	/* $("#li_home").addClass("active"); */
</script>